package cn.bdqn.pojo;

public class Page {
  //总页数
	private int pageCount;
	//当前页
	private int pageIndex;
	
	//每页显示的个数
	private int pageSize;
	//总个数
	private int counts;
	public int getPageCount() {
		if(counts/pageSize==0){
			pageCount=counts/pageSize;
		}else{
			pageCount=counts/pageSize+1;
		}
		return pageCount;
	}
	public int getPageIndex() {
		return pageIndex;
	}
	public int getPageSize() {
		
		return pageSize;
	}
	public int getCounts() {
		return counts;
	}
	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
	}
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public void setCounts(int counts) {
		this.counts = counts;
	}
	//从第几条起
	public int getStart(){
		return (pageIndex-1)*pageSize+1;
		
	}
	//结束条数
	public int getEnd(){
		return pageIndex*pageSize;
		
	}
}
